﻿<!DOCTYPE HTML>
<!--STATUS OK-->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>


    <style>
        * {
            padding-top: 0px;
            padding-right: 0px;
            padding-bottom: 0px;
            padding-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            margin-left: 0px;
        }

        UL {
            list-style-type: none;
        }

        LI {
            list-style-type: none;
        }

        HTML {
            color: #666b76;
            font-family: "微软雅黑","宋体",arial;
            font-size: 14px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            margin-left: 0px;
        }

        BODY {
            color: #666b76;
            font-family: "微软雅黑","宋体",arial;
            font-size: 14px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            margin-left: 0px;
        }

        INPUT {
            color: #666b76;
            font-family: "微软雅黑","宋体",arial;
            font-size: 14px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
            margin-left: 0px;
        }

        .left {
            float: left;
        }

        LABEL {
            vertical-align: top;
        }

        .clearfix:after {
            height: 0px;
            overflow: hidden;
            clear: both;
            display: block;
            visibility: hidden;
            content: ".";
        }

        .clearfix {
            display: block;
            zoom: 1;
        }

        .red {
            color: red;
        }

        .question_list .item {
            position: relative;
            margin-top: 5px;
        }

        .question_list .clean {
            position: absolute;
            top: 2px;
            right: 5px;
            cursor: pointer;
            padding: 2px;
            border-radius: 3px;
            display: none;
        }

        .sub_item {
            padding: 5px;
            margin: 5px 30px;
            border-radius: 5px;
            display: none;
        }

        .question_list .item-title {
            margin: 0 0 2px 10px;
        }

        .item-vals {
            padding-bottom: 10px;
            display: none;
            margin-left: 20px;
        }

        .question_list .item-vals {
            background-color: #ffffcc;
            padding: 10px;
        }

        .qtip {
            margin-bottom: 5px;
            color: #666;
        }

        h3 {
            font-size: 14px;
        }

        .clearfix {
            zoom: 1;
        }

            .clearfix:after {
                display: block;
                clear: both;
                height: 0;
                overflow: hidden;
            }

        #permit_main {
            width: 688px;
            /*padding-bottom: 20px;*/
            overflow-x: hidden;
            margin: 0 5px 10px 5px;
            position: relative;
        }

        #zr_error {
            display: none;
        }
    </style>


    <script>
        var STATIC_VERSION = '20131107180000';
    </script>
    <script src="http://bd.rong360.com/static/scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://bd.rong360.com/static/js/common.js?v=20131107180000"></script>
    <script type="text/javascript" src="http://bd.rong360.com/static/scripts/bd-common.js?v=20131107180000"></script>
    
</head>
<body>




    <form id="product_permit_form" method="post" onsubmit="return false">
        <div id="permit_main" style="">
            <div class="clearfix">
                <div style="overflow:hidden; padding:0 10px; float:left;width:655px;" id="permit-div">
                    <h3>您要求客户回答的问题。（根据产品要求的资质正确勾选，有助于筛选掉<span class="red">不符合要求</span>的客户）</h3>
                    <div id="zr_error"><span class="red">请您选择符合办理条件的客户资质问题。</span>根据产品要求正确设置问题，提升<span class="red">80%</span>下单客户质量。</div>
                    <ul class="question_list left">
                        <li class="item " id="item-5">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 两年内信用情况</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_5_0"><input name="5[]" type="checkbox" value="0" id="item_5_0" data-id="5" /> 无信用记录</label>
                                <label for="item_5_1"><input name="5[]" type="checkbox" value="1" id="item_5_1" data-id="5" /> 信用记录良好</label>
                                <label for="item_5_2"><input name="5[]" type="checkbox" value="2" id="item_5_2" data-id="5" /> 有少数逾期</label>
                                <label for="item_5_3"><input name="5[]" type="checkbox" value="3" id="item_5_3" data-id="5" /> 长期多次逾期（90天、半年内60天、多次30天）</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-12">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 银行卡发放工资/月</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                关系：<input type="radio" name="12[operator]" data-name="12" value="ge" /> 大于&nbsp;&nbsp; <input type="radio" name="12[operator]" value="le" />小于&nbsp;&nbsp;值: <input type="text" value="" name="12[value]" inptype="operator" /> 元

                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item " id="item-20">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 您名下的房产</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_20_0"><input name="20[]" type="checkbox" value="0" id="item_20_0" data-id="20" /> 无房产</label>
                                <label for="item_20_1"><input name="20[]" type="checkbox" value="1" id="item_20_1" data-id="20" /> 商品住宅</label>
                                <label for="item_20_2"><input name="20[]" type="checkbox" value="2" id="item_20_2" data-id="20" /> 商铺</label>
                                <label for="item_20_3"><input name="20[]" type="checkbox" value="3" id="item_20_3" data-id="20" /> 办公楼</label>
                                <label for="item_20_4"><input name="20[]" type="checkbox" value="4" id="item_20_4" data-id="20" /> 厂房</label>
                                <label for="item_20_6"><input name="20[]" type="checkbox" value="6" id="item_20_6" data-id="20" /> 经适房/限价房</label>
                                <label for="item_20_8"><input name="20[]" type="checkbox" value="8" id="item_20_8" data-id="20" /> 房改房/危改房</label>
                                <label for="item_20_10"><input name="20[]" type="checkbox" value="10" id="item_20_10" data-id="20" /> 小产权房</label>
                                <label for="item_20_12"><input name="20[]" type="checkbox" value="12" id="item_20_12" data-id="20" /> 宅基地</label>
                                <label for="item_20_14"><input name="20[]" type="checkbox" value="14" id="item_20_14" data-id="20" /> 商住两用房</label>
                                <label for="item_20_16"><input name="20[]" type="checkbox" value="16" id="item_20_16" data-id="20" /> 军产房</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-22">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 住宅房龄</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_22_10"><input name="22[]" type="checkbox" value="10" id="item_22_10" data-id="22" /> 10年以下</label>
                                <label for="item_22_15"><input name="22[]" type="checkbox" value="15" id="item_22_15" data-id="22" /> 10-15年（含）</label>
                                <label for="item_22_20"><input name="22[]" type="checkbox" value="20" id="item_22_20" data-id="22" /> 15-20年（含）</label>
                                <label for="item_22_25"><input name="22[]" type="checkbox" value="25" id="item_22_25" data-id="22" /> 20-25年（含）</label>
                                <label for="item_22_30"><input name="22[]" type="checkbox" value="30" id="item_22_30" data-id="22" /> 25-30年（含）</label>
                                <label for="item_22_35"><input name="22[]" type="checkbox" value="35" id="item_22_35" data-id="22" /> 30年以上</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-23">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 抵押物是否已抵押/按揭中</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_23_1"><input name="23[]" type="radio" value="1" id="item_23_1" data-id="23" /> 是，已被抵押/按揭中</label>
                                <label for="item_23_2"><input name="23[]" type="radio" value="2" id="item_23_2" data-id="23" /> 否，未被抵押</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item " id="item-45">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 您的户籍</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_45_1"><input name="45[]" type="checkbox" value="1" id="item_45_1" data-id="45" /> 本地户籍</label>
                                <label for="item_45_2"><input name="45[]" type="checkbox" value="2" id="item_45_2" data-id="45" /> 外地户籍</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-46">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 经营注册地</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_46_1"><input name="46[]" type="checkbox" value="1" id="item_46_1" data-id="46" /> 本地</label>
                                <label for="item_46_2"><input name="46[]" type="checkbox" value="2" id="item_46_2" data-id="46" /> 外地</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-49">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 总经营流水/月</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                关系：<input type="radio" name="49[operator]" data-name="49" value="ge" /> 大于&nbsp;&nbsp; <input type="radio" name="49[operator]" value="le" />小于&nbsp;&nbsp;值: <input type="text" value="" name="49[value]" inptype="operator" /> 万元

                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-50">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 对公账户经营收入/月</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                关系：<input type="radio" name="50[operator]" data-name="50" value="ge" /> 大于&nbsp;&nbsp; <input type="radio" name="50[operator]" value="le" />小于&nbsp;&nbsp;值: <input type="text" value="" name="50[value]" inptype="operator" /> 万元

                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-56">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 房产估值</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                关系：<input type="radio" name="56[operator]" data-name="56" value="ge" /> 大于&nbsp;&nbsp; <input type="radio" name="56[operator]" value="le" />小于&nbsp;&nbsp;值: <input type="text" value="" name="56[value]" inptype="operator" /> 万元

                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-59">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 经营年限</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_59_0"><input name="59[]" type="checkbox" value="0" id="item_59_0" data-id="59" /> 不足半年</label>
                                <label for="item_59_6"><input name="59[]" type="checkbox" value="6" id="item_59_6" data-id="59" /> 半年</label>
                                <label for="item_59_12"><input name="59[]" type="checkbox" value="12" id="item_59_12" data-id="59" /> 1年</label>
                                <label for="item_59_24"><input name="59[]" type="checkbox" value="24" id="item_59_24" data-id="59" /> 2年</label>
                                <label for="item_59_36"><input name="59[]" type="checkbox" value="36" id="item_59_36" data-id="59" /> 3年</label>
                                <label for="item_59_60"><input name="59[]" type="checkbox" value="60" id="item_59_60" data-id="59" /> 5年及以上</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-64">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 商铺房龄</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_64_10"><input name="64[]" type="checkbox" value="10" id="item_64_10" data-id="64" /> 10年以下</label>
                                <label for="item_64_15"><input name="64[]" type="checkbox" value="15" id="item_64_15" data-id="64" /> 10-15年（含）</label>
                                <label for="item_64_20"><input name="64[]" type="checkbox" value="20" id="item_64_20" data-id="64" /> 15-20年（含）</label>
                                <label for="item_64_25"><input name="64[]" type="checkbox" value="25" id="item_64_25" data-id="64" /> 20-25年（含）</label>
                                <label for="item_64_30"><input name="64[]" type="checkbox" value="30" id="item_64_30" data-id="64" /> 25-30年（含）</label>
                                <label for="item_64_35"><input name="64[]" type="checkbox" value="35" id="item_64_35" data-id="64" /> 30年以上</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-65">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 办公楼房龄要求</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_65_10"><input name="65[]" type="checkbox" value="10" id="item_65_10" data-id="65" /> 10年以下</label>
                                <label for="item_65_15"><input name="65[]" type="checkbox" value="15" id="item_65_15" data-id="65" /> 10-15年（含）</label>
                                <label for="item_65_20"><input name="65[]" type="checkbox" value="20" id="item_65_20" data-id="65" /> 15-20年（含）</label>
                                <label for="item_65_25"><input name="65[]" type="checkbox" value="25" id="item_65_25" data-id="65" /> 20-25年（含）</label>
                                <label for="item_65_30"><input name="65[]" type="checkbox" value="30" id="item_65_30" data-id="65" /> 25-30年（含）</label>
                                <label for="item_65_35"><input name="65[]" type="checkbox" value="35" id="item_65_35" data-id="65" /> 30年以上</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-71">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 现金收入/月</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                关系：<input type="radio" name="71[operator]" data-name="71" value="ge" /> 大于&nbsp;&nbsp; <input type="radio" name="71[operator]" value="le" />小于&nbsp;&nbsp;值: <input type="text" value="" name="71[value]" inptype="operator" /> 元

                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item " id="item-88">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 职业身份</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_88_1"><input name="88[]" type="checkbox" value="1" id="item_88_1" data-id="88" /> 企业主</label>
                                <label for="item_88_2"><input name="88[]" type="checkbox" value="2" id="item_88_2" data-id="88" /> 个体户</label>
                                <label for="item_88_4"><input name="88[]" type="checkbox" value="4" id="item_88_4" data-id="88" /> 上班族</label>
                                <label for="item_88_10"><input name="88[]" type="checkbox" value="10" id="item_88_10" data-id="88" /> 无固定职业</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item " id="item-90">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 是否有车辆</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_90_0"><input name="90[]" type="checkbox" value="0" id="item_90_0" data-id="90" /> 无车</label>
                                <label for="item_90_5"><input name="90[]" type="checkbox" value="5" id="item_90_5" data-id="90" /> 名下有车</label>
                                <label for="item_90_7"><input name="90[]" type="checkbox" value="7" id="item_90_7" data-id="90" /> 有车，但车已被抵押</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-91">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 现金结算经营收入/月</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                关系：<input type="radio" name="91[operator]" data-name="91" value="ge" /> 大于&nbsp;&nbsp; <input type="radio" name="91[operator]" value="le" />小于&nbsp;&nbsp;值: <input type="text" value="" name="91[value]" inptype="operator" /> 万元

                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item " id="item-92">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 是否拥有特殊抵押物</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                <label for="item_92_1"><input name="92[]" type="checkbox" value="1" id="item_92_1" data-id="92" /> 股权</label>
                                <label for="item_92_3"><input name="92[]" type="checkbox" value="3" id="item_92_3" data-id="92" /> 企业经营用器械</label>
                                <label for="item_92_5"><input name="92[]" type="checkbox" value="5" id="item_92_5" data-id="92" /> 货物</label>
                                <label for="item_92_20"><input name="92[]" type="checkbox" value="20" id="item_92_20" data-id="92" /> 无以上抵押物</label>
                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                        <li class="item sub_item" id="item-115">
                            <div class="item-title"><input type="checkbox" class="check-title" /> 劳动合同签订时间</div>
                            <div class="clean">清空</div>
                            <div class="item-vals">
                                <div class="qtip">用户如何回答才符合您的要求？</div>
                                大于等于：<input type="text" value="" name="115[min]" /> , 小于等于：<input type="text" value="" name="115[max]"> date

                            </div>
                            <ul class="sub_question"></ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="top20" style="margin-left: 25px;padding-bottom: 25px;display:none;">
            <input type="submit" value="确定" class="btn btn-query btn-green" />
            <input style="display:none;" onclick="window.parent.PopLayer.close();" type="button" value="取消" class="btn btn-query btn-grey cancel" />
        </div>
    </form>
    <script type="text/javascript">
        var key = "";
        (function () {
            var arrTemplate = [{ "id": "5", "category_id": "13", "parent_id": "0", "title": "\u4e24\u5e74\u5185\u4fe1\u7528\u60c5\u51b5", "comment": "", "type": "2", "data": [{ "desc": "\u65e0\u4fe1\u7528\u8bb0\u5f55", "value": "0" }, { "desc": "\u4fe1\u7528\u8bb0\u5f55\u826f\u597d", "value": "1" }, { "desc": "\u6709\u5c11\u6570\u903e\u671f", "value": "2" }, { "desc": "\u957f\u671f\u591a\u6b21\u903e\u671f\uff0890\u5929\u3001\u534a\u5e74\u518560\u5929\u3001\u591a\u6b2130\u5929\uff09", "value": "3" }], "rely": [], "recommend_match": "\u7b26\u5408\u4fe1\u7528\u60c5\u51b5\u8981\u6c42", "recommend_require": "\u5bf9\u4fe1\u7528\u60c5\u51b5\u6709\u8981\u6c42", "recommend_empty": "\u4e0d\u8981\u6c42\u4fe1\u7528\u60c5\u51b5", "error_info": "\u6b64\u8d37\u6b3e\u8981\u6c42\u6709\u4fe1\u7528\u8bb0\u5f55", "create_time": "1354180909", "modify_time": "1378228915", "is_del": "0", "name": "\u4fe1\u7528\u60c5\u51b5", "var_name": "user_loan_experience", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u4e24\u5e74\u5185$val", "rank": "7", "hidden": "0" }, { "id": "12", "category_id": "11", "parent_id": "88", "title": "\u94f6\u884c\u5361\u53d1\u653e\u5de5\u8d44\/\u6708", "comment": "", "type": "3", "data": [], "rely": ["4"], "recommend_match": "\u6bcf\u6708\u6253\u5165\u94f6\u884c\u5361\u7684\u5de5\u8d44\u6570\u989d\u7b26\u5408\u8981\u6c42", "recommend_require": "\u6253\u5361\u5de5\u8d44$val", "recommend_empty": "\u65e0\u6253\u5165\u94f6\u884c\u5361\u5de5\u8d44\u6570\u989d\u8981\u6c42", "error_info": "\u6bcf\u6708\u6253\u5165\u94f6\u884c\u5361\u7684\u5de5\u8d44\u6570\u989d\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354182768", "modify_time": "1377238719", "is_del": "0", "name": "\u5de5\u8d44\u6536\u5165", "var_name": "user_income_by_card", "unit": "\u5143", "apply_agent": "1", "standard_type": "1", "natural_state": "\u6bcf\u6708\u6253\u5361\u5de5\u8d44\u4e3a$val\u5143", "rank": "5", "hidden": "0" }, { "id": "20", "category_id": "14", "parent_id": "0", "title": "\u60a8\u540d\u4e0b\u7684\u623f\u4ea7", "comment": "\u7ed9\u5f00\u653e\u5e73\u53f0\u4e0a\u7ebf\u589e\u52a0\u4e86\u51e0\u4e2a\u623f\u4ea7\u7c7b\u578b\u9009\u9879\uff0c\u5e76\u628a\u8fd9\u4e2a\u6a21\u677f\u66ff\u6362\u4e86\u201c\u662f\u5426\u6709\u672c\u5730\u623f\u4ea7\u201d\u5feb\u7b5b", "type": "2", "data": [{ "desc": "\u65e0\u623f\u4ea7", "value": "0" }, { "desc": "\u5546\u54c1\u4f4f\u5b85", "value": "1" }, { "desc": "\u5546\u94fa", "value": "2" }, { "desc": "\u529e\u516c\u697c", "value": "3" }, { "desc": "\u5382\u623f", "value": "4" }, { "desc": "\u7ecf\u9002\u623f\/\u9650\u4ef7\u623f", "value": "6" }, { "desc": "\u623f\u6539\u623f\/\u5371\u6539\u623f", "value": "8" }, { "desc": "\u5c0f\u4ea7\u6743\u623f", "value": "10" }, { "desc": "\u5b85\u57fa\u5730", "value": "12" }, { "desc": "\u5546\u4f4f\u4e24\u7528\u623f", "value": "14" }, { "desc": "\u519b\u4ea7\u623f", "value": "16" }], "rely": [], "recommend_match": "\u7b26\u5408\u623f\u4ea7\u7c7b\u578b\u8981\u6c42", "recommend_require": "\u6709\u623f\u4ea7\u7c7b\u578b\u8981\u6c42", "recommend_empty": "\u65e0\u623f\u4ea7\u7c7b\u578b\u8981\u6c42", "error_info": "\u623f\u4ea7\u7c7b\u578b\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354186555", "modify_time": "1382582887", "is_del": "0", "name": "\u60a8\u7684\u623f\u4ea7\u7c7b\u578b", "var_name": "col_type", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u623f\u4ea7\u7c7b\u578b\u662f$val", "rank": "8", "hidden": "0" }, { "id": "22", "category_id": "14", "parent_id": "20", "title": "\u4f4f\u5b85\u623f\u9f84", "comment": "", "type": "2", "data": [{ "desc": "10\u5e74\u4ee5\u4e0b", "value": "10" }, { "desc": "10-15\u5e74\uff08\u542b\uff09", "value": "15" }, { "desc": "15-20\u5e74\uff08\u542b\uff09", "value": "20" }, { "desc": "20-25\u5e74\uff08\u542b\uff09", "value": "25" }, { "desc": "25-30\u5e74\uff08\u542b\uff09", "value": "30" }, { "desc": "30\u5e74\u4ee5\u4e0a", "value": "35" }], "rely": ["1"], "recommend_match": "\u4f4f\u5b85\u623f\u9f84\u7b26\u5408\u8981\u6c42", "recommend_require": "\u5bf9\u4f4f\u5b85\u623f\u9f84\u6709\u8981\u6c42", "recommend_empty": "\u65e0\u4f4f\u5b85\u623f\u9f84\u8981\u6c42", "error_info": "\u4f4f\u5b85\u623f\u9f84\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354242953", "modify_time": "1366855210", "is_del": "0", "name": "\u4f4f\u5b85\u623f\u9f84", "var_name": "col_house_age", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u4f4f\u5b85\u623f\u9f84\u4e3a$val", "rank": "8", "hidden": "0" }, { "id": "23", "category_id": "14", "parent_id": "20", "title": "\u62b5\u62bc\u7269\u662f\u5426\u5df2\u62b5\u62bc\/\u6309\u63ed\u4e2d", "comment": "", "type": "1", "data": [{ "desc": "\u662f\uff0c\u5df2\u88ab\u62b5\u62bc\/\u6309\u63ed\u4e2d", "value": "1" }, { "desc": "\u5426\uff0c\u672a\u88ab\u62b5\u62bc", "value": "2" }], "rely": ["1", "2", "3", "4"], "recommend_match": "\u7b26\u5408\u65e0\u4e8c\u6b21\u62b5\u62bc\u8981\u6c42", "recommend_require": "\u5bf9\u62b5\u62bc\u7269\u60c5\u51b5\u6709\u8981\u6c42", "recommend_empty": "\u65e0\u4e8c\u6b21\u62b5\u62bc\u8981\u6c42", "error_info": "\u62b5\u62bc\u7269\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354243232", "modify_time": "1378229029", "is_del": "0", "name": "\u62b5\u62bc\u7269\u60c5\u51b5", "var_name": "col_has_mortgage", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u62b5\u62bc\u7269\u672a\u88ab\u62b5\u62bc", "rank": "10", "hidden": "0" }, { "id": "45", "category_id": "12", "parent_id": "0", "title": "\u60a8\u7684\u6237\u7c4d", "comment": "", "type": "2", "data": [{ "desc": "\u672c\u5730\u6237\u7c4d", "value": "1" }, { "desc": "\u5916\u5730\u6237\u7c4d", "value": "2" }], "rely": [], "recommend_match": "\u6237\u7c4d\u7b26\u5408\u8981\u6c42", "recommend_require": "\u5bf9\u6237\u7c4d\u6240\u5728\u5730\u6709\u8981\u6c42", "recommend_empty": "\u65e0\u6237\u7c4d\u8981\u6c42", "error_info": "\u6237\u7c4d\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354257854", "modify_time": "1366870728", "is_del": "0", "name": "\u60a8\u7684\u6237\u53e3", "var_name": "user_nationality", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "$val", "rank": "1", "hidden": "0" }, { "id": "46", "category_id": "11", "parent_id": "88", "title": "\u7ecf\u8425\u6ce8\u518c\u5730", "comment": "", "type": "2", "data": [{ "desc": "\u672c\u5730", "value": "1" }, { "desc": "\u5916\u5730", "value": "2" }], "rely": ["1", "2"], "recommend_match": "\u7ecf\u8425\u6ce8\u518c\u5730\u7b26\u5408\u8981\u6c42", "recommend_require": "\u5bf9\u7ecf\u8425\u6ce8\u518c\u5730\u6709\u8981\u6c42", "recommend_empty": "\u65e0\u7ecf\u8425\u6ce8\u518c\u5730\u8981\u6c42", "error_info": "\u7ecf\u8425\u6ce8\u518c\u5730\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354258001", "modify_time": "1366858553", "is_del": "0", "name": "\u7ecf\u8425\u6ce8\u518c\u5730", "var_name": "com_register_place", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u7ecf\u8425\u6ce8\u518c\u5730\u5728$val", "rank": "4", "hidden": "0" }, { "id": "49", "category_id": "11", "parent_id": "88", "title": "\u603b\u7ecf\u8425\u6d41\u6c34\/\u6708", "comment": "", "type": "3", "data": [], "rely": ["1", "2"], "recommend_match": "\u7b26\u5408\u603b\u6d41\u6c34\u8981\u6c42", "recommend_require": "\u603b\u7ecf\u8425\u6d41\u6c34$val", "recommend_empty": "\u603b\u7ecf\u8425\u6d41\u6c34\u8981\u6c42", "error_info": "\u4e0d\u7b26\u5408\u603b\u7ecf\u8425\u6d41\u6c34\u8981\u6c42", "create_time": "1354258178", "modify_time": "1383621403", "is_del": "0", "name": "\u4e2a\u4eba\u8d26\u6237\u7ecf\u8425\u6536\u5165", "var_name": "com_month_flow", "unit": "\u4e07\u5143", "apply_agent": "1", "standard_type": "1", "natural_state": "\u6bcf\u6708\u4e2a\u4eba\u8d26\u6237\u7ecf\u8425\u6536\u5165\u4e3a$val\u4e07\u5143", "rank": "5", "hidden": "0" }, { "id": "50", "category_id": "11", "parent_id": "88", "title": "\u5bf9\u516c\u8d26\u6237\u7ecf\u8425\u6536\u5165\/\u6708", "comment": "", "type": "3", "data": [], "rely": ["1"], "recommend_match": "\u7b26\u5408\u5bf9\u516c\u8d26\u6237\u7ecf\u8425\u6536\u5165\u8981\u6c42", "recommend_require": "\u5bf9\u516c\u8d26\u6237\u7ecf\u8425\u6536\u5165$val", "recommend_empty": "\u65e0\u5bf9\u516c\u8d26\u6237\u7ecf\u8425\u6536\u5165\u8981\u6c42", "error_info": "\u4e0d\u7b26\u5408\u5bf9\u516c\u8d26\u6237\u7ecf\u8425\u6536\u5165\u8981\u6c42", "create_time": "1354258224", "modify_time": "1378229294", "is_del": "0", "name": "\u5bf9\u516c\u8d26\u6237\u7ecf\u8425\u6536\u5165", "var_name": "com_taxable_income", "unit": "\u4e07\u5143", "apply_agent": "1", "standard_type": "1", "natural_state": "\u6bcf\u6708\u5bf9\u516c\u8d26\u6237\u7ecf\u8425\u6536\u5165\u4e3a$val\u4e07\u5143", "rank": "5", "hidden": "0" }, { "id": "56", "category_id": "14", "parent_id": "20", "title": "\u623f\u4ea7\u4f30\u503c", "comment": "", "type": "3", "data": [], "rely": ["1", "2", "3", "4", "14"], "recommend_match": "\u623f\u4ea7\u4f30\u503c\u7b26\u5408\u8981\u6c42", "recommend_require": "\u623f\u4ea7\u4f30\u503c$val", "recommend_empty": "\u65e0\u623f\u4ea7\u4f30\u503c\u8981\u6c42", "error_info": "\u623f\u4ea7\u4f30\u503c\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354528384", "modify_time": "1382496936", "is_del": "0", "name": "\u623f\u4ea7\u4f30\u503c", "var_name": "col_value", "unit": "\u4e07\u5143", "apply_agent": "1", "standard_type": "1", "natural_state": "\u623f\u4ea7\u4f30\u503c\u4e3a$val\u4e07\u5143", "rank": "8", "hidden": "0" }, { "id": "59", "category_id": "11", "parent_id": "88", "title": "\u7ecf\u8425\u5e74\u9650", "comment": "", "type": "2", "data": [{ "desc": "\u4e0d\u8db3\u534a\u5e74", "value": "0" }, { "desc": "\u534a\u5e74", "value": "6" }, { "desc": "1\u5e74", "value": "12" }, { "desc": "2\u5e74", "value": "24" }, { "desc": "3\u5e74", "value": "36" }, { "desc": "5\u5e74\u53ca\u4ee5\u4e0a", "value": "60" }], "rely": ["1", "2"], "recommend_match": "\u7ecf\u8425\u5e74\u9650\u7b26\u5408\u8981\u6c42", "recommend_require": "\u5bf9\u7ecf\u8425\u5e74\u9650\u6709\u8981\u6c42", "recommend_empty": "\u65e0\u7ecf\u8425\u5e74\u9650\u8981\u6c42", "error_info": "\u7ecf\u8425\u5e74\u9650\u4e0d\u6ee1\u8db3\u8981\u6c42", "create_time": "1354624715", "modify_time": "1367052419", "is_del": "0", "name": "\u7ecf\u8425\u5e74\u9650", "var_name": "com_op_period", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u7ecf\u8425\u5e74\u9650$val", "rank": "3", "hidden": "0" }, { "id": "64", "category_id": "14", "parent_id": "20", "title": "\u5546\u94fa\u623f\u9f84", "comment": "", "type": "2", "data": [{ "desc": "10\u5e74\u4ee5\u4e0b", "value": "10" }, { "desc": "10-15\u5e74\uff08\u542b\uff09", "value": "15" }, { "desc": "15-20\u5e74\uff08\u542b\uff09", "value": "20" }, { "desc": "20-25\u5e74\uff08\u542b\uff09", "value": "25" }, { "desc": "25-30\u5e74\uff08\u542b\uff09", "value": "30" }, { "desc": "30\u5e74\u4ee5\u4e0a", "value": "35" }], "rely": ["2"], "recommend_match": "\u5546\u94fa\u623f\u9f84\u7b26\u5408\u8981\u6c42", "recommend_require": "\u5bf9\u5546\u94fa\u623f\u9f84\u6709\u8981\u6c42", "recommend_empty": "\u65e0\u5546\u94fa\u623f\u9f84\u8981\u6c42", "error_info": "\u5546\u94fa\u623f\u9f84\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354796493", "modify_time": "1376994224", "is_del": "0", "name": "\u5546\u94fa\u623f\u9f84", "var_name": "col_shop_age", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u5546\u94fa\u623f\u9f84\u4e3a$val", "rank": "8", "hidden": "0" }, { "id": "65", "category_id": "14", "parent_id": "20", "title": "\u529e\u516c\u697c\u623f\u9f84\u8981\u6c42", "comment": "", "type": "2", "data": [{ "desc": "10\u5e74\u4ee5\u4e0b", "value": "10" }, { "desc": "10-15\u5e74\uff08\u542b\uff09", "value": "15" }, { "desc": "15-20\u5e74\uff08\u542b\uff09", "value": "20" }, { "desc": "20-25\u5e74\uff08\u542b\uff09", "value": "25" }, { "desc": "25-30\u5e74\uff08\u542b\uff09", "value": "30" }, { "desc": "30\u5e74\u4ee5\u4e0a", "value": "35" }], "rely": ["3"], "recommend_match": "\u529e\u516c\u697c\u623f\u9f84\u7b26\u5408\u8981\u6c42", "recommend_require": "\u5bf9\u529e\u516c\u697c\u623f\u9f84\u6709\u8981\u6c42", "recommend_empty": "\u65e0\u529e\u516c\u697c\u623f\u9f84\u8981\u6c42", "error_info": "\u529e\u516c\u697c\u623f\u9f84\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1354796584", "modify_time": "1376994244", "is_del": "0", "name": "\u529e\u516c\u697c\u623f\u9f84", "var_name": "col_office_age", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u529e\u516c\u697c\u623f\u9f84\u4e3a$val", "rank": "8", "hidden": "0" }, { "id": "71", "category_id": "11", "parent_id": "88", "title": "\u73b0\u91d1\u6536\u5165\/\u6708", "comment": "\u7ed9\u4e0d\u9700\u8981\u6253\u5361\u7684\u63a5\u53d7\u73b0\u91d1\u6536\u5165\u7684\u4ea7\u54c1\u4f7f\u7528", "type": "3", "data": [], "rely": ["4", "10"], "recommend_match": "\u7b26\u5408\u73b0\u91d1\u6536\u5165\u8981\u6c42", "recommend_require": "\u73b0\u91d1\u6536\u5165$val", "recommend_empty": "\u4e0d\u8981\u6c42\u73b0\u91d1\u6536\u5165", "error_info": "\u4e0d\u7b26\u5408\u73b0\u91d1\u8981\u6c42", "create_time": "1357722490", "modify_time": "1366891372", "is_del": "0", "name": "\u5de5\u8d44\u6536\u5165", "var_name": "cash_receipts", "unit": "\u5143", "apply_agent": "1", "standard_type": "1", "natural_state": "\u6bcf\u6708\u73b0\u91d1\u6536\u5165$val\u5143", "rank": "5", "hidden": "0" }, { "id": "88", "category_id": "11", "parent_id": "0", "title": "\u804c\u4e1a\u8eab\u4efd", "comment": "", "type": "2", "data": [{ "desc": "\u4f01\u4e1a\u4e3b", "value": "1" }, { "desc": "\u4e2a\u4f53\u6237", "value": "2" }, { "desc": "\u4e0a\u73ed\u65cf", "value": "4" }, { "desc": "\u65e0\u56fa\u5b9a\u804c\u4e1a", "value": "10" }], "rely": [], "recommend_match": "\u516c\u53f8\u7c7b\u578b\u7b26\u5408\u8981\u6c42", "recommend_require": "\u6709\u804c\u4e1a\u8eab\u4efd\u8981\u6c42", "recommend_empty": "\u65e0\u516c\u53f8\u7c7b\u578b\u8981\u6c42", "error_info": "\u4e0d\u7b26\u5408\u8be5\u8d37\u6b3e\u7684\u516c\u53f8\u7c7b\u578b\u8981\u6c42", "create_time": "1366854174", "modify_time": "1369113865", "is_del": "0", "name": "\u804c\u4e1a\u8eab\u4efd", "var_name": "op_type", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "$val", "rank": "2", "hidden": "0" }, { "id": "90", "category_id": "14", "parent_id": "0", "title": "\u662f\u5426\u6709\u8f66\u8f86", "comment": "", "type": "2", "data": [{ "desc": "\u65e0\u8f66", "value": "0" }, { "desc": "\u540d\u4e0b\u6709\u8f66", "value": "5" }, { "desc": "\u6709\u8f66\uff0c\u4f46\u8f66\u5df2\u88ab\u62b5\u62bc", "value": "7" }], "rely": [], "recommend_match": "\u7b26\u5408\u540d\u4e0b\u6709\u8f66\u8981\u6c42", "recommend_require": "\u8981\u6c42\u540d\u4e0b\u6709\u8f66\u8f86", "recommend_empty": "\u4e0d\u8981\u6c42\u540d\u4e0b\u6709\u8f66", "error_info": "\u4e0d\u7b26\u5408\u540d\u4e0b\u6709\u8f66\u8981\u6c42", "create_time": "1366854533", "modify_time": "1372836943", "is_del": "0", "name": "\u662f\u5426\u6709\u8f66\u8f86", "var_name": "user_has_car", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "$val", "rank": "9", "hidden": "0" }, { "id": "91", "category_id": "11", "parent_id": "88", "title": "\u73b0\u91d1\u7ed3\u7b97\u7ecf\u8425\u6536\u5165\/\u6708", "comment": "", "type": "3", "data": [], "rely": ["2"], "recommend_match": "\u73b0\u91d1\u7ed3\u7b97\u7ecf\u8425\u6536\u5165\u7b26\u5408\u8981\u6c42", "recommend_require": "\u8981\u6c42\u73b0\u91d1\u7ed3\u7b97\u7ecf\u8425\u6536\u5165", "recommend_empty": "\u4e0d\u8981\u6c42\u73b0\u91d1\u7ed3\u7b97\u7ecf\u8425\u6536\u5165", "error_info": "\u73b0\u91d1\u7ed3\u7b97\u7ecf\u8425\u6536\u5165\u4e0d\u7b26\u5408\u8981\u6c42", "create_time": "1366861883", "modify_time": "1367825013", "is_del": "0", "name": "\u73b0\u91d1\u7ed3\u7b97\u7ecf\u8425\u6536\u5165", "var_name": "cash_settlement", "unit": "\u4e07\u5143", "apply_agent": "1", "standard_type": "1", "natural_state": "\u6bcf\u6708\u73b0\u91d1\u7ed3\u7b97\u7ecf\u8425\u6536\u5165$val\u4e07\u5143", "rank": "5", "hidden": "0" }, { "id": "92", "category_id": "14", "parent_id": "0", "title": "\u662f\u5426\u62e5\u6709\u7279\u6b8a\u62b5\u62bc\u7269", "comment": "", "type": "2", "data": [{ "desc": "\u80a1\u6743", "value": "1" }, { "desc": "\u4f01\u4e1a\u7ecf\u8425\u7528\u5668\u68b0", "value": "3" }, { "desc": "\u8d27\u7269", "value": "5" }, { "desc": "\u65e0\u4ee5\u4e0a\u62b5\u62bc\u7269", "value": "20" }], "rely": [], "recommend_match": "\u7b26\u5408\u62e5\u6709\u7279\u6b8a\u62b5\u62bc\u7269\u8981\u6c42", "recommend_require": "\u8981\u6c42\u7279\u6b8a\u62b5\u62bc\u7269", "recommend_empty": "\u4e0d\u8981\u6c42\u7279\u6b8a\u62b5\u62bc\u7269", "error_info": "\u4e0d\u7b26\u5408\u62e5\u6709\u7279\u6b8a\u62b5\u62bc\u7269\u8981\u6c42", "create_time": "1368003405", "modify_time": "1368599333", "is_del": "0", "name": "\u62e5\u6709\u7279\u6b8a\u62b5\u62bc\u7269", "var_name": "special_mortgage", "unit": "", "apply_agent": "1", "standard_type": "1", "natural_state": "\u6709$val\u4e3a\u62b5\u62bc\u7269", "rank": "10", "hidden": "0" }, { "id": "115", "category_id": "19", "parent_id": "114", "title": "\u52b3\u52a8\u5408\u540c\u7b7e\u8ba2\u65f6\u95f4", "comment": "", "type": "5", "data": [], "rely": ["2"], "recommend_match": "\u52b3\u52a8\u5408\u540c\u7b7e\u8ba2\u65f6\u95f4", "recommend_require": "\u52b3\u52a8\u5408\u540c\u7b7e\u8ba2\u65f6\u95f4", "recommend_empty": "\u52b3\u52a8\u5408\u540c\u7b7e\u8ba2\u65f6\u95f4", "error_info": "\u52b3\u52a8\u5408\u540c\u7b7e\u8ba2\u65f6\u95f4", "create_time": "1380191493", "modify_time": "1381404774", "is_del": "0", "name": "\u52b3\u52a8\u5408\u540c\u7b7e\u8ba2\u65f6\u95f4", "var_name": null, "unit": "date", "apply_agent": "1", "standard_type": "2", "natural_state": null, "rank": null, "hidden": "0" }],
                arrPermit = false,
                $form = $('#product_permit_form'),
                arrTplMap = {},
                tempChildren = [],
                tplItem;
            $.each(arrTemplate, function (i, item) {
                if (!arrTplMap[item.id] && item.parent_id == 0) {
                    arrTplMap[item.id] = item;
                } else if (item.parent_id > 0) {
                    tempChildren.push(item);
                }
            });

            $.each(tempChildren, function (i, item) {
                var parent_id = item.parent_id,
                    parentItem = arrTplMap[parent_id];
                if (parentItem) {
                    if (!parentItem.children)
                        parentItem.children = [];
                    parentItem.children.push(item);
                }
            });

            //清空选项
            $('body').on('click', '.clean', function () {
                var $this = $(this),
                     vals = $this.parent().find('.item-vals:first');

                vals.find('input:checked').removeAttr('checked').change();
                vals.find('input[type=text]').val('');

            }).on('change', '.check-title', function () {
                var $this = $(this),
                    checked = $this.attr('checked'),
                    item = $this.parent().parent(),
                    itemvals = item.find('.item-vals:first');

                if (checked) {
                    itemvals.show();
                } else {
                    itemvals.hide();
                    itemvals.find('input[type=radio]:checked,input[type=checkbox]').removeAttr('checked');
                    itemvals.find('input[type=text]').val('');
                }

                //对数据做特殊处理，隐藏
                $('#item_20_0').parent().hide();
                $('#item_90_0').parent().hide();
                $('#item_92_20').parent().hide();

                size = {
                    width: $('#main').width(),
                    height: $('#permit-div').height() + 70
                };
                window.parent.PopLayer.resize(size);;

            }).on('focus', 'input[inptype=operator]', function () {
                var $this = $(this),
                    operator = $this.parent().find('input[type=radio]:checked');

                if (!operator.length) {
                    alert('请选择选项的关系: 大于或小于');
                    $this.blur();
                }

            }).on('change', 'input', function () {
                var $this = $(this),
                    id = $this.data('id'),
                    val = $this.val(),
                    wrap = $('#item-' + id),
                    isChecked = $this.attr('checked')
                tplItem;

                if (!id)
                    return;

                tplItem = arrTplMap[id];

                if (tplItem && tplItem.children && tplItem.children.length) {
                    $.each(tplItem.children, function (k, item) {
                        var rely = item.rely;
                        if (rely && rely.length) {
                            if ($.inArray(val, rely) !== -1) {
                                var domItem = $('#item-' + item.id);
                                if (isChecked && domItem.css('display') == 'none') {
                                    domItem.appendTo(wrap.find('ul.sub_question:first')).show();
                                } else {
                                    if (!hasChecked(wrap, rely)) {
                                        domItem.hide().find('input:checked').removeAttr('checked');
                                        domItem.find('input[type=text]').val('');
                                    }
                                }
                            }
                        }
                    });
                }

            });

            //$('#item_8_1').attr('checked',true).change();
            //初始化选项
            if (arrPermit && arrPermit.single) {
                $.each(arrPermit.single, function (i, permit) {
                    var $item = $('#item-' + permit.id);
                    $item.find('.check-title').attr('checked', true).change();

                    //单独处理
                    if ($item.find('#operate_days').length) {
                        $('#operate_days').find('option').each(function (i, item) {
                            var $item = $(item);
                            if ($item.val() == permit.data['value']) {
                                $item.attr('selected', true);
                            }
                        })
                    }

                    if (permit.type == 2 || permit.type == 1) {
                        $.each(permit.data, function (k, val) {
                            $('#item_' + permit.id + '_' + val).attr('checked', true).change();
                        })
                    } else if (permit.data && permit.data.operator) {

                        $('input[type=radio][name="' + permit.id + '[operator]"]').each(function (i, item) {
                            if (item.value == permit.data.operator) {
                                item.checked = true;
                            }
                        });

                        $('input[type=text][name="' + permit.id + '[value]"]').val(permit.data.value)
                    } else if (permit.data && permit.data.min) {
                        $('input[name="' + permit.id + '[min]"]').val(permit.data.min);
                        $('input[name="' + permit.id + '[max]"]').val(permit.data.max);
                    }
                })
            }

            function hasChecked(item, rely) {
                var id = item.attr('id').replace(/[^\d]+/, ''),
                flag = false,
                relyItem;

                $.each(rely, function (i, re) {
                    relyItem = $('#item_' + id + '_' + re);
                    if (relyItem.length && relyItem.attr('checked')) {
                        flag = true;
                        return true;
                    }
                });
                return flag;
            }

            function postData() {

                var $data = $form.serializeArray(),
                    $required_items = $('#required_items li'),
                    $action = $form.attr('action'),
                    flag = false;

                //必填项校验
                $required_items.each(function (i, item) {
                    var $item = $(item);

                    if ($item.find('select').length && $item.find('select').val() == '') {
                        $item.find('select').focus();
                        flag = true;
                        return false;
                    } else if ($item.find('input[type=checkbox]').length && !$item.find('input[type=checkbox]:checked').length) {
                        $item.find('input[type=checkbox]:first').focus();
                        flag = true;
                        return false;
                    } else if ($item.find('input[type=radio]').length && !$item.find('input[type=radio]:checked').length) {
                        $item.find('input[type=radio]:first').focus();
                        flag = true;
                        return false;
                    }

                });

                if (flag) {
                    $('#required_wrap').find('small').css('color', 'red');
                    return;
                }
                return $data;
                //window.parent.PopLayer.close();
            }

            $form.on('submit', function () {
                var data = postData();
                window.parent.Product.returnPop(data);
            });


            size = {
                width: $('#main').width(),
                height: $(document).height()
            };
            setInterval(function () {
                if (parent.Product) {
                    parent.Product.updatePerData(postData());
                }
                if (parent.Resize) {
                    parent.Resize($(document).find('body').height() + 10);
                }
            }, 50);
        })();
    </script>


    <script>
        (function () {
            //调整窗口大小, 保证第一时间展示.
            function resize() {
                if (window.parent && window.parent.PopLayer) {
                    var size = {
                        width: $('div:first', document.body).width(),
                        height: $('div:first', document.body).height()
                    }
                    window.parent.PopLayer.resize(size);
                }
            }
            resize();
            $(resize);
            window._resizeFrame = resize;

            //添加关闭窗口事件. 因为google链接缓慢, 避免外层事件.
            $('.close, .cancel').click(function () {
                window.parent.PopLayer.close();
            });
            $('.ok').click(function () {

            });

        })();
    </script>

</body>
</html>
